<?
$section = $args->section;
$section_data = $args->section_data;

if($position_table = $config->tables[$section['position_table']]['table'])
{
    $table = new Table($position_table);
    $items = $table->select('select * from `'.$position_table.'` where section_id=:section_id order by sort',
        array(
            'section_id'=>$section['id']
        )
    );
}
?>
<section id="<?=$args->section['alias']?>">
    <div class="main-block center">
        <h2><?=$section_data['name']?></h2>
        <div class="thanks-gallery">
            <ul>
                <?foreach($items as $item){?>
                <li>
                    <a href="<?=$item['img']?>" rel="thankshotos_<?=$section['id']?>">
                        <div class="photo">
                            <div>
                                <img src="<?=get_cache_pic($item['img'],194,194)?>">
                            </div>
                        </div>

                    </a>
                    <span><?=$item['title']?></span>
                </li>
                <?}?>

            </ul>
            <div  class="back"></div>
            <div  class="forward"></div>
        </div>
    </div>
</section>
